﻿using System;
using System.Collections.Generic;
using System.Text;
using EmbeddedSharp.Core;

namespace EmbeddedSharp.Core.Function.Logic {
    public class NotEqualNode : LogicOperatorNode {

        /// <summary>
        /// !=
        /// </summary>
        public NotEqualNode()
            : base() {
            this.Value = "!=";
        }

        public override FuncNode GetReversedFunction(int index) {
            return new EqualNode();
        }

        public override object Evaluate() {
            string lr = Left.Evaluate().ToString();
            string rr = Right.Evaluate().ToString();

            return Convert.ToString(lr != rr);
        }
    }
}
